#include <stdio.h>

int main() {
     int triangle[6][6];
     for (int i = 0; i < 6; i++) {
        triangle[i][0] = 1; 
        triangle[i][i] = 1; 

        for (int j = 1; j < i; j++) {
            triangle[i][j] = triangle[i - 1][j - 1] + triangle[i - 1][j];
        }
    }

   
    for (int i = 0; i < 6; i++) {
        
        for (int k = 0; k < 6 - i - 1; k++) {
            printf("   ");
        }

        for (int j = 0; j <= i; j++) {
            printf("%6d", triangle[i][j]);
        }
        printf("\n");
    }

    return 0;
}